import { NgModule } from "@angular/core";
import { BrowserModule } from "@angular/platform-browser";
import { FormsModule } from "@angular/forms";
import { BrowserAnimationsModule } from "@angular/platform-browser/animations";
import { HttpClientModule } from "@angular/common/http";
import { Router } from "@angular/router";
import { AppComponent } from "./app.component";
import { PageNotFoundComponent } from "./page-not-found/page-not-found.component";
import { AppRoutingModule } from "./app-routing.module";
import { NgZorroAntdModule } from "ng-zorro-antd";
import { NzButtonModule } from "ng-zorro-antd/button";
import { NzLayoutModule } from "ng-zorro-antd/layout";
import { OutputdesignComponent } from "./outputdesign/outputdesign.component";
import { OutputdesigndtoComponent } from "./outputdesign/outputdesigndto/outputdesigndto.component";
import { OutputdesignclassComponent } from "./outputdesign/outputdesignclass/outputdesignclass.component";
import { OutputdesignotherdtoComponent } from "./outputdesign/outputdesignotherdto/outputdesignotherdto.component";
import { OutputdesignothersComponent } from "./outputdesign/outputdesignothers/outputdesignothers.component";
import { OutputdesigndownloadComponent } from "./outputdesign/outputdesigndownload/outputdesigndownload.component";
import { CreateModule } from "./create";
import { ImportedfilesModule } from "./imported-files/imported-files.module";
import { ImportedfilesListComponent } from "./imported-files/imported-files-list/imported-files-list.component";
import { ImageItemDetailComponent } from "./imported-files/image-item-detail/image-item-detail.component";
import { SharedModule } from "./shared";
import { ImportComponent } from "./import/import.component";
import { CommonComponent } from "./common/common.component";

@NgModule({
  imports: [
    BrowserModule,
    BrowserAnimationsModule,
    FormsModule,
    HttpClientModule,
    AppRoutingModule,
    NgZorroAntdModule,
    NzButtonModule,
    NzLayoutModule,
    CreateModule,
    SharedModule,
  ],
  declarations: [
    AppComponent,
    PageNotFoundComponent,
    OutputdesignComponent,
    OutputdesigndtoComponent,
    OutputdesignclassComponent,
    OutputdesignotherdtoComponent,
    OutputdesignothersComponent,
    OutputdesigndownloadComponent,
    ImportedfilesListComponent,
    ImageItemDetailComponent,
    ImportComponent,
    CommonComponent,
  ],
  providers: [],
  bootstrap: [AppComponent],
})
export class AppModule {
  // Diagnostic only: inspect router configuration
  constructor(router: Router) {
    // Use a custom replacer to display function names in the route configs
    // const replacer = (key, value) => (typeof value === 'function') ? value.name : value;
    // console.log('Routes: ', JSON.stringify(router.config, replacer, 2));
  }
}
